function [ro] = convert_hexagonal_to_rhombohedral(ro)
%CONVERT_HEXAGONAL_TO_RHOMBOHEDRAL Summary of this function goes here
%   Detailed explanation goes here

A_h = ro.LatticeVectors(1,:);
B_h = ro.LatticeVectors(2,:);
C_h = ro.LatticeVectors(3,:);

B_r = (-A_h + B_h + C_h)/3;
A_r = (2*A_h + B_h + C_h)/3;
C_r = (-A_h - 2*B_h + C_h)/3;

% A_r = [0 norm(A_h)*sqrt(3) norm(C_h)]/2;
% B_r = [0 norm(A_h)*sqrt(3) norm(C_h)]/2;
% C_r = [0 norm(A_h)*sqrt(3) norm(C_h)]/2;

ro.LatticeVectors = [A_r; B_r; C_r];


end

